package com.sumainfor.zuul.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.zuul.service.ZxZuulService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 由前端直接调用网关的控制器
 *
 */
@RestController
@RequestMapping("/tenant/key/ZxZuul")
public class ZxWxZuulController {

    @Autowired
    private ZxZuulService zxZuulService;
    /**
     * 根据公司编号查询公司所在的市编号
     * @return
     */
    @GetMapping("/getSysArea")
    public JsonResult getSysArea(@RequestParam Map<String,Object> params){
        JsonResult result=new JsonResult();
        Map<String,Object> map=zxZuulService.getSysArea(params);
        if(map==null) {
            map=new HashMap<String,Object>();
        }
       result.put(map);
        return result;
    }
}
